﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Collections;
using MulagoDb.model;
using NHibernate;
namespace MulagoDb
{
    public partial class LoginFrm : Form
    {
        IList patients;
        public LoginFrm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (PatientRegistration.authenticate(userNameTfld.Text, passwordTfld.Text))
            {
                new FindPatient().Show();
            }
            else
            {
                MessageBox.Show(this, "Invalid username or password, please try again");
            }
            //new FindPatient().Show();
            //this.Hide();
            //System.Diagnostics.Process.Start("Shutdown", "-s -t 10");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void LoginFrm_Load(object sender, EventArgs e)
        {
        }
    }
}
